package com.shop.service;

import com.shop.dao.UserDao;
import com.shop.entity.User;


public class UserService {

	private UserDao userDao = new UserDao();
	
	
	public User login(User user) {
		User u = userDao.findByUsername(user.getUsername());
		if(u != null && u.getPassword().equals(user.getPassword())) {
			return u;
		} else {
			return null;
		}
	}
	
}
